# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=dtkgui
pkgver=5.6.8
_commit=419e11629bd09818f0b973db7b946926a0439f37
pkgrel=1
epoch=1
pkgdesc='Deepin Toolkit, gui module for DDE look and feel'
arch=('loong64' 'x86_64')
url="https://github.com/linuxdeepin/dtkgui"
license=('LGPL3')
depends=('dtkcore' 'freeimage' 'libraw' 'libqtxdg' 'librsvg')
makedepends=('git' 'cmake' 'ninja' 'qt5-tools' 'gtest' 'doxygen')
source=("git+https://github.com/linuxdeepin/dtkgui.git#commit=$_commit")
sha512sums=('SKIP')

build() {
  cd dtkgui
  cmake . -GNinja \
    -DMKSPECS_INSTALL_DIR=lib/qt/mkspecs/modules/ \
    -DBUILD_DOCS=ON \
    -DQCH_INSTALL_DESTINATION=share/doc/qt \
    -DCMAKE_INSTALL_LIBDIR=lib \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DDVERSION=$pkgver
  ninja
}

package() {
  cd dtkgui
  DESTDIR="$pkgdir" ninja install
}
